package com.huo.task.service;

import com.huo.filestransport.service.FtpService;
import org.quartz.DisallowConcurrentExecution;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@DisallowConcurrentExecution
@Component
public class DownloadFtpFile {

	private final Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	private FtpService ftpService;

	public void execute(){
		logger.info("下载队列中文件的JOB开始：" );
		ftpService.downloadFtpFileByDB();
		logger.info("下载队列中文件的JOB结束：" );
	}

}
